Skip to content

Conversation

@jm-clius
Copy link
Contributor

@jm-clius jm-clius commented Oct 23, 2025

Add SDS-R into reliable channels as optional parallel or singular strategy for recovery.

There are three main design choices that need review here:

  1. SDS-R by default functions as a parallel mechanism to store retrieval: there is no lockstep mechanism where the one retrieval strategy serves as fallback if the other fails. This seems to me the most natural way of integrating SDS-R, after some consideration. In general, a reliable channels instance will attempt store retrieval after detecting a missed dependency without delay. SDS-R will kick in with some delay (generally min 30s). If by that point the missing dependency has been received (via relay or via Store retrieval), the pending repair will be removed from the buffer and never enter an SDS-R exchange. There is however a possible race condition that can cause a missing dependency to be requested (and retrieved) from a Store node and via SDS-R. This is not optimal, but I think a reasonable tradeoff for simplicity.

  2. Store retrieval can now be disabled completely, adding some configuration complexity i.t.o. retrievalStrategy ("store only", "sds-r only", "both", "none"). I'm not quite convinced this level of configurability is necessary, but there seems to be some use cases for a store-less reliable channel based on recent Discord discussions.

  3. SDS-R works better if the sync period is shorter, so I've added a simple adaptive strategy that triggers Sync more often if there are pending repair requests. This has an impact on bandwidth and message rates.

@github-actions
Copy link

github-actions bot commented Oct 23, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
Waku node 96.24 KB (-0.08% 🔽) 2 s (-0.08% 🔽) 963 ms (+4.91% 🔺) 2.9 s
Waku Simple Light Node 147.6 KB (+0.08% 🔺) 3 s (+0.08% 🔺) 762 ms (-12.5% 🔽) 3.8 s
ECIES encryption 22.62 KB (0%) 453 ms (0%) 514 ms (+78.24% 🔺) 966 ms
Symmetric encryption 22 KB (0%) 440 ms (0%) 278 ms (+14.18% 🔺) 718 ms
DNS discovery 52.17 KB (0%) 1.1 s (0%) 692 ms (+20.09% 🔺) 1.8 s
Peer Exchange discovery 52.91 KB (0%) 1.1 s (0%) 764 ms (+84.72% 🔺) 1.9 s
Peer Cache Discovery 46.64 KB (0%) 933 ms (0%) 356 ms (-39.8% 🔽) 1.3 s
Privacy preserving protocols 77.31 KB (+0.04% 🔺) 1.6 s (+0.04% 🔺) 948 ms (-9.95% 🔽) 2.5 s
Waku Filter 79.82 KB (+0.13% 🔺) 1.6 s (+0.13% 🔺) 1.1 s (+20.67% 🔺) 2.7 s
Waku LightPush 77.97 KB (-0.03% 🔽) 1.6 s (-0.03% 🔽) 1.3 s (+68.65% 🔺) 2.8 s
History retrieval protocols 83.74 KB (+0.11% 🔺) 1.7 s (+0.11% 🔺) 826 ms (-2.39% 🔽) 2.6 s
Deterministic Message Hashing 28.98 KB (0%) 580 ms (0%) 345 ms (-45.58% 🔽) 924 ms

@jm-clius jm-clius force-pushed the feat/sds-r-in-reliable-channels branch 2 times, most recently from 90fddd2 to 3ba50d4 Compare October 24, 2025 14:26
Base automatically changed from feat/sds-repair to master October 28, 2025 10:27
@jm-clius jm-clius force-pushed the feat/sds-r-in-reliable-channels branch from 3ba50d4 to 9d82564 Compare October 30, 2025 11:54
@jm-clius jm-clius marked this pull request as ready for review October 30, 2025 17:33
@jm-clius jm-clius requested a review from a team as a code owner October 30, 2025 17:33
@jm-clius jm-clius requested a review from fryorcraken October 30, 2025 17:33
@jm-clius jm-clius merged commit 788f7e6 into master Nov 21, 2025
14 of 17 checks passed
@jm-clius jm-clius deleted the feat/sds-r-in-reliable-channels branch November 21, 2025 15:03
@weboko weboko mentioned this pull request Nov 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants